F = "<col. width>[,<L[eft]|R[ight]|C[enter]|D[ecimal]>[,<separator>]]"
PARAMETERS
<text> can be any valid HyperTalk container, or a litteral string.
[,<F1>[…,<Fn>]] define formats, each format applying to the corresponding column. Up to 14 formats can be defined, the last one being used for all succeeding columns.
A format is a three items string : an integer for the column width (>0 and
<256), a char (L, R, C or D) for the alignment of the text in the column and a separation string of any length which will be inserted after the column.
If the char "*" is used for the column width, it will be calculated accor-ding to the longest item found in it.
If no format is passed as param, "*,L, " will be used as default.
"s=<sep char>" is an optionnal single character, and allows to use any other char in place of comma to delimit the columns. Defaut is comma (or current itemDelimiter value with HC2.1).
"f=<filler char>" is an optionnal single character, and allows to define the filler character (space by default).
Using "!", "?" or "=" as first parameter will return an online help (resp. copyright, syntax and output).
USING
The XFCN return the columnized text. If a chunk is longer than its column width, its last (or first, with right alignment) char will be "…".
Each column's width cannot exceed 255 chars.
Finally, use a non-proportional font (Courier, Monaco, etc.) for the field to get a correct presentation.
ERRORS
If an error occurs, the fonction will return :
"Error : Out of memory"
"Error : Missing parameter"
"Error : Param must be "s=…" or "f=…""
"Error : Missing char following "X=""
"Error : First item of Format X must be an integer > 0"
"Error : First item of Format X must be an integer ≤ 255"
"Error : Second item of Format X must be [l,r,c,d]"
HISTORY
2.7 06/18/92
• Added HC 2.1 itemDelimiter support
2.6 06/09/92
• Fixed bug when no format param is passed
• Fixed bug with decimal format and non-decimal data
2.5 03/17/92
• Fixed decimal alignment
• Trailing returns removed from input List
2.4 03/15/92
• Fixed that rare, random & nasty bug
• Unlimited columns number
• Added decimal alignment
• Changed delim & filler params format
• Only first param is now needed
• Each line is extended to the last column.
2.2
• Max columns extended to 100 with range checking
2.1
• Last column delimiter removed.
2.0
• Fixed a small bug arising with certain delimiter chars.
• Added the automatic column width calculation.
1.1
• third items of a format string can now be empty
• no more separator string returned after last column
• all separator strings are shown, even for empty lines
• filler char choice added
• all separator strings shown, whatever is number of items of line
Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses: